package logic

import (
	"context"

	"go-zero-mall/app/product/cmd/rpc/internal/svc"
	"go-zero-mall/app/product/cmd/rpc/pb"

	"github.com/zeromicro/go-zero/core/logx"
)

type PmsMemberPriceInfoDeleteLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewPmsMemberPriceInfoDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PmsMemberPriceInfoDeleteLogic {
	return &PmsMemberPriceInfoDeleteLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *PmsMemberPriceInfoDeleteLogic) PmsMemberPriceInfoDelete(in *pb.PmsMemberPriceInfoDeleteReq) (*pb.PmsMemberPriceInfoDeleteResp, error) {
	err := l.svcCtx.PmsFeightTemplateModel.Delete(l.ctx, in.Id)
	if err != nil {
		return nil, err
	}
	return &pb.PmsMemberPriceInfoDeleteResp{}, nil
}
